home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / telecomm / fnordadl / fn132src.zoo / cith / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-02  |  7.9 KB  |  203 lines

  1. /*
  2.  * config.h -- configuration structure and stuff for Fnordadel
  3.  *
  4.  * 91Apr29 AA    Extracted from ctdl.h and other places.
  5.  */
  6.  
  7. #ifndef _CONFIG_H
  8. #define _CONFIG_H
  9.  
  10. #ifndef NUMBAUDS
  11. #include "modem.h"
  12. #endif
  13.  
  14. typedef unsigned short    OFFSET;
  15.  
  16. /* Following #defines robbed from Hue, Jr.'s Cit-86 and modified at will */
  17. #define MAILSLOTS       cfg.mailslots    /* # mail msgs users can have    */
  18. #define MAXROOMS    cfg.maxrooms    /* # of rooms allowed in system    */
  19. #define SHARED_ROOMS    cfg.sharedrooms    /* # rooms shared with a system    */
  20.  
  21. #define MAXCODE    500        /* codebuffer inside cfg        */
  22.  
  23. typedef unsigned short    ushort;
  24. typedef unsigned int    uint;
  25.  
  26. /*
  27.  * Citadel programs use readSysTab() and writeSysTab() to write an image of
  28.  * the external variables in RAM to disk, and later restore it.  The image is
  29.  * stored in CTDLTABL.SYS .  If CTDLTABL.SYS is lost, CONFIGUR will
  30.  * automatically reconstruct it the hard way when invoked, and write a new
  31.  * CTDLTABL.SYS out when finished.  CTDLTABL.SYS is always destroyed after
  32.  * reading, to minimize the possibility of reading an out-of-date version.
  33.  * In general, the technique works well and saves time and head-banging on
  34.  * bootup.  You should, however, note carefully the following caution:
  35.  *
  36.  *  o  Whenever you change the declarations in Ctdl.h you should:
  37.  *   -->  destroy the current CTDLTABL.SYS file
  38.  *   -->  recompile and reload all citadel programs which access CTDLTABL.SYS
  39.  *      -- currently CITADEL.TOS & CONFIGUR.TOS, plus utilities
  40.  *   -->  use CONFIGUR.TOS to build a new CTDLTABL.SYS file
  41.  *
  42.  * If you ignore these warnings, little pixies will prick you in your
  43.  * sleep for the rest of your life.
  44.  */
  45.  
  46. struct _cfgflags {
  47.     /* user-oriented stuff */
  48.     uint    ENTEROK     : 1;    /* OK to enter messages anon    */
  49.     uint    READOK        : 1;    /* unlogged folks can read mess */
  50.     uint    LOGINOK        : 1;    /* spontan. new accounts ok.    */
  51.     uint    ROOMOK        : 1;    /* general folks can make rooms    */
  52.     uint    INFOOK        : 1;
  53.     uint    NOMAIL        : 1;    /* mail not allowed by default?    */
  54.     uint    ALLDOOR        : 1;
  55.     uint    ALLNET        : 1;    /* all users get net privvies    */
  56.     uint    GETNAME        : 1;    /* force callers to login with
  57.                        name as well as password    */
  58.     uint    KEEPHOLD    : 1;    /* keep held mail messages?    */
  59.     uint    AUTOZEROLIMIT    : 1;
  60.  
  61.     /* user configuration defaults */
  62.     uint    DEFSHOWTIME    : 1;
  63.     uint    DEFLASTOLD    : 1;
  64.     uint    DEFFLOORMODE    : 1;
  65.     uint    DEFREADMORE    : 1;
  66.     uint    DEFNUMLEFT    : 1;
  67.     uint    DEFAUTONEW    : 1;
  68.  
  69.     /* sysop-oriented stuff */
  70.     uint    AIDE_FORGET    : 1;    /* aides can forget rooms    */
  71.     uint    SHOWRECD    : 1;    /* show "rec'd" flag in Mail>?    */
  72.     uint    NOCHAT        : 1;    /* suppress chat attempts    */
  73.     uint    DISKUSAGE    : 1;    /* do a df() after each dir    */
  74.     uint    ARCHIVE_MAIL    : 1;    /* archive the sysop's mail    */
  75.     uint    SYSOPSLEEP    : 1;    /* let Sysop sleep at console?    */
  76.     uint    AIDEKILLROOM    : 1;    /* let Aides kill rooms?    */
  77.     uint    VAPORIZE    : 1;
  78.     
  79.     /* defaults */
  80.     uint    DEBUG        : 1;    /* turns debug printout on/off    */
  81.     uint    FZAP        : 1;    /* default flags for +zap,    */
  82.     uint    FNETLOG        : 1;    /*              +netlog,    */
  83.     uint    FNETDEB        : 1;    /*             +netdebug    */
  84.  
  85.     /* modem and net stuff */
  86.     uint    USA        : 1;    /* system in north america?    */
  87.     uint    PATHALIAS    : 1;    /* do intelligent mail routing    */
  88.     uint    FORWARD_MAIL    : 1;    /* forward mail thru this node?    */
  89.     uint    SEARCH_BAUD    : 1;    /* do flip flop search for baud */
  90.     uint    CONNECTPROMPT    : 1;    /* prompt for CR when connected    */
  91.     uint    MODEMCC        : 1;    /* modem do condition codes?    */
  92.     uint    HAYES        : 1;    /* recognise codes in dialing    */
  93.     uint    ANONNETMAIL    : 1;    /* will we accept net mail from    */
  94.                     /* an unknown net node?        */
  95.     uint    ANONFILEXFER    : 1;    /* will we do a file xfer    */
  96.                     /* with an unknown net node?    */
  97.     uint    PURGENET    : 1;    /* Purge net traffic w/ +purge?    */
  98.     uint    KEEPDISCARDS    : 1;    /* keep files reject by loop    */
  99.                     /* zapper or net purger?    */
  100.     /* misc stuff */
  101.     uint    BANNERBLB    : 1;
  102. } ;
  103.  
  104. struct config {
  105.     ushort maxMSector;        /* Max # of sectors (simulated)     */
  106.     ushort catChar;        /* Location of next write in msg file    */
  107.     ushort catSector;
  108.     ushort cryptSeed;        /* xor crypt offset            */
  109.     long oldest;        /* 32-bit ID# of first message in system*/
  110.     long newest;        /* 32-bit ID# of last  message in system*/
  111.  
  112.     ushort logsize;        /* number of log entries supported    */
  113.     ushort mailslots;        /* mailslots..sharedrooms stolen    */
  114.     ushort maxrooms;        /* shamelessly from Hue, Jr. & Cit-86    */
  115.     ushort sharedrooms;        /* and modified beyond all recognition    */
  116.     ushort maxmsgs;        /* Max number of messages enterable per    */
  117.                 /* user per room per login session    */
  118.     ushort maxmailmsgs;        /* Max number of messages enterable per    */
  119.                 /* user in Mail> per login session    */
  120.     int  anonmailmax;        /* Max size of mail msgs from users not    */
  121.                 /* loggedIn.                */
  122.     int  infomax;        /* Max size of info files from users    */
  123.                 /* not Aides or Co-Sysops.        */
  124.     ushort maxcalls;        /* Max number of calls per user per day    */
  125.     ushort maxtime;        /* Max number of minutes connect time    */
  126.                 /* per user per day            */
  127.     ushort maxclosecalls;    /* Max number close calls / user / day    */
  128.     ushort closetime;        /* Max number of minutes separating two    */
  129.                 /* calls to qualify as "close calls"    */
  130.     ushort mincalltime;        /* minimum time credited for each call    */
  131.     ushort newusermsgs;        /* # msgs to show new users; all, if 0    */
  132.     ushort evtclosetime;    /* if less than this many seconds to a    */
  133.                     /* scheduled event, don't allow doors.    */
  134. #if 0
  135.     long flags;            /* various boolean flags (see flags.h)    */
  136. #else
  137.     struct _cfgflags flags;
  138. #endif
  139.     /*
  140.      * system identification for users & networking.
  141.      */
  142.     OFFSET nodeName;        /* name for networking            */
  143.     OFFSET nodeTitle;        /* name displayed for callers        */
  144.     OFFSET nodeId;        /* phone number/network id        */
  145.     OFFSET shell;        /* shell to execute if you do an ^LO    */
  146.     OFFSET sysopName;        /* user to throw SYSOP mail at.        */
  147.     OFFSET hub;            /* for forwarding mail.            */
  148.     OFFSET organization;    /* descriptive field for headers    */
  149.     OFFSET domain;        /* Cit-86 style domain            */
  150.     /*
  151.      * system directory offsets in codeBuf
  152.      */
  153.     OFFSET sysdir;        /* where we keep various system files    */
  154.     OFFSET roomdir;        /* where the room files go        */
  155.     OFFSET helpdir;        /* .hlp, .mnu, .blb files        */
  156.     OFFSET msgdir;        /* primary messagefile            */
  157.     OFFSET netdir;        /* where net files are found        */
  158.     OFFSET auditdir;        /* where audit files are found        */
  159.     OFFSET receiptdir;        /* where sendfile stuff goes        */
  160.     OFFSET holddir;        /* where held messages go        */
  161.  
  162.     OFFSET modemSetup;        /* string to set up the modem        */
  163.     OFFSET mCCs[NUMBAUDS];    /* strings for getting condition codes    */
  164.                 /* from the modem            */
  165.     OFFSET dialPrefix;        /* string to prefix telephone #'s with    */
  166.     OFFSET dialSuffix;        /* string to append to telephone #'s    */
  167.  
  168.     char sysPassword[60];    /* Remote sysop             */
  169.     char filter[128];        /* input character translation table    */
  170.     char codeBuf[MAXCODE];    /* strings buffer            */
  171.     char shave[8];        /* shave-and-a-haircut/2 bits pauses    */
  172.  
  173.     ushort recSize;        /* how many K we can recieve.        */
  174.     ushort numbanners;        /* how many rotating banners.        */
  175.     ushort syswidth;        /* default terminal width        */
  176.     char call_log;        /* if > 0, keep a call-log.        */
  177.  
  178.     int  evtCount;        /* number of events to deal with...    */
  179.     int  floorCount;        /* number of floors to deal with...    */
  180.     int  arch_count;        /* number of external archivers we have */
  181.     int  zap_count;        /* loop zap table size            */
  182.     int  netSize;        /* How many on the net?         */
  183.  
  184.     int  poll_count;        /* # polling events            */
  185.     long poll_delay;        /* idle time before polling systems    */
  186.  
  187.     char sysBaud;        /* What's our baud rate going to be?    */
  188.     char probug;
  189.     int  connectDelay;        /* wait after connect before autobauding*/
  190.     int  local_time;        /* how long to wait 'til local hangup    */
  191.     int  ld_time;        /* how long to wait 'til l-d hangup    */
  192.     /*
  193.      * accounting variables
  194.      */
  195.     long download;        /* download limit...            */
  196.     char ld_cost;        /* cost to mail to a l-d system        */
  197.     char hubcost;        /* cost to route mail through #hub    */
  198. } ;
  199.  
  200.  
  201. #endif /* _CONFIG_H */
  202.  
  203.